import { type Component, defineComponent, h } from "vue"
import { ref } from "vue" // 需要导入ref
import LayoutConsole from "./Console" // 需要导入组件
import LayoutWebsite from "./Website" // 需要导入组件
interface Typraphy {
  "layout-console": Component
  "layout-website": Component
}
export default defineComponent({
  name: "layout-typraphy",
  props: {
    current: {
      type: String as ()=> keyof Typraphy,
      default: "layout-console"
    }
  },
  setup(props, { slots }) { // 需要添加slots参数
    const typraphy = ref<Typraphy>({ // 修正泛型语法和括号
      "layout-console": LayoutConsole,
      "layout-website": LayoutWebsite
    })

    // 假设这里需要返回一个组件，根据props或其他逻辑选择
    return () => h(typraphy.value[props.current], {}, slots) // 修正h函数调用
  }
})
